<?php
$current_page = "ornitologos";
header("Content-Type: text/html; charset=utf-8");

$jsonurl = "http://nibble.li/twittertido/web/topUsers.php";
$json = file_get_contents($jsonurl, 0, null, null);
$json_output = json_decode($json, true);
$arrays = $json_output['users'];
?>
<!DOCTYPE html>
<html class="ui-mobile-rendering">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <meta name="viewport" content="width=device-width, initial-scale=1"> 
        <title>Twittertido - Procastination everywhere!!!</title>
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
        <link rel="stylesheet" href="css/glamour.css" />
        <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
        <script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
        <script src="js/common.js"></script>
        <!--script type="text/javascript">
            $( function() {
                $('body').bind( 'swipeleft', function( e ) {
                    //                    window.location = 'jd.php';
                    $.mobile.changePage("cautiverio.php", {
                        reloadPage: true
                    });
                } );
                $('body').bind( 'swiperight', function( e ) {
                    $.mobile.changePage("piopio.php", {
                        reloadPage: true
                    });
                } );

            } );
        </script-->
    </head>
    <body>
        <div data-role="page" >
            <?php include_once("header.php"); ?>
            <ul data-role="listview">
                <?php foreach ($arrays as $user) { ?>
                    <li>
                        <a href="http://twitter.com/#!/<?php print $user['user_tweet']; ?>" target="_blank" >
                            <img src="https://api.twitter.com/1/users/profile_image?screen_name=<?php print $user['user_tweet']; ?>&size=bigger" />
                            <div style="white-space: normal; font-weight: bold;"><?php print $user['user_tweet']; ?></div>
                            <div style="position: absolute; bottom: 5px; white-space: normal; font-size: smaller; font-weight: normal;"><?php print $user['total']; ?> tweets publicados</div>
                        </a>
                    </li>
                <?php } ?>
            </ul><!-- /listview -->
            <?php include_once("footer.php"); ?>
        </div><!-- /page -->
    </body>
</html>

